home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_gtk / INCLUDE / GTK / GTKTIPSQ.{2S < prev    next >
Text File  |  1999-09-17  |  3KB  |  108 lines

  1. /* GTK - The GIMP Toolkit
  2.  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  3.  *
  4.  * GtkQueryTips: Query onscreen widgets for their tooltips
  5.  * Copyright (C) 1998 Tim Janik
  6.  *
  7.  * This library is free software; you can redistribute it and/or
  8.  * modify it under the terms of the GNU Library General Public
  9.  * License as published by the Free Software Foundation; either
  10.  * version 2 of the License, or (at your option) any later version.
  11.  *
  12.  * This library is distributed in the hope that it will be useful,
  13.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15.  * Library General Public License for more details.
  16.  *
  17.  * You should have received a copy of the GNU Library General Public
  18.  * License along with this library; if not, write to the
  19.  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  20.  * Boston, MA 02111-1307, USA.
  21.  */
  22.  
  23. /*
  24.  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
  25.  * file for a list of people on the GTK+ Team.  See the ChangeLog
  26.  * files for a list of changes.  These files are distributed with
  27.  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
  28.  */
  29.  
  30. #ifndef __GTKTIPSQUERY_H__
  31. #define __GTKTIPSQUERY_H__
  32.  
  33.  
  34. #include <gtk/gtklabel.h>
  35.  
  36.  
  37. #ifdef __cplusplus
  38. extern "C" {
  39. #endif /* __cplusplus */
  40.  
  41.  
  42. /* --- type macros --- */
  43. #define    GTK_TYPE_TIPS_QUERY        (gtk_tips_query_get_type ())
  44. #define GTK_TIPS_QUERY(obj)        (GTK_CHECK_CAST ((obj), GTK_TYPE_TIPS_QUERY, GtkTipsQuery))
  45. #define GTK_TIPS_QUERY_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_TIPS_QUERY, GtkTipsQueryClass))
  46. #define GTK_IS_TIPS_QUERY(obj)        (GTK_CHECK_TYPE ((obj), GTK_TYPE_TIPS_QUERY))
  47. #define GTK_IS_TIPS_QUERY_CLASS(klass)    (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TIPS_QUERY))
  48.  
  49.  
  50. /* --- typedefs --- */
  51. typedef    struct    _GtkTipsQuery        GtkTipsQuery;
  52. typedef    struct    _GtkTipsQueryClass    GtkTipsQueryClass;
  53.  
  54.  
  55. /* --- structures --- */
  56. struct    _GtkTipsQuery
  57. {
  58.   GtkLabel    label;
  59.  
  60.   guint        emit_always : 1;
  61.   guint        in_query : 1;
  62.   gchar        *label_inactive;
  63.   gchar        *label_no_tip;
  64.  
  65.   GtkWidget    *caller;
  66.   GtkWidget    *last_crossed;
  67.  
  68.   GdkCursor    *query_cursor;
  69. };
  70.  
  71. struct    _GtkTipsQueryClass
  72. {
  73.   GtkLabelClass            parent_class;
  74.  
  75.   void    (*start_query)        (GtkTipsQuery    *tips_query);
  76.   void    (*stop_query)        (GtkTipsQuery    *tips_query);
  77.   void    (*widget_entered)    (GtkTipsQuery    *tips_query,
  78.                  GtkWidget    *widget,
  79.                  const gchar    *tip_text,
  80.                  const gchar    *tip_private);
  81.   gint    (*widget_selected)    (GtkTipsQuery    *tips_query,
  82.                  GtkWidget    *widget,
  83.                  const gchar    *tip_text,
  84.                  const gchar    *tip_private,
  85.                  GdkEventButton    *event);
  86. };
  87.  
  88.  
  89. /* --- prototypes --- */
  90. GtkType        gtk_tips_query_get_type        (void);
  91. GtkWidget*    gtk_tips_query_new        (void);
  92. void        gtk_tips_query_start_query    (GtkTipsQuery    *tips_query);
  93. void        gtk_tips_query_stop_query    (GtkTipsQuery    *tips_query);
  94. void        gtk_tips_query_set_caller    (GtkTipsQuery    *tips_query,
  95.                          GtkWidget    *caller);
  96. void        gtk_tips_query_set_labels     (GtkTipsQuery   *tips_query,
  97.                          const gchar    *label_inactive,
  98.                          const gchar    *label_no_tip);
  99.      
  100.  
  101.  
  102. #ifdef __cplusplus
  103. }
  104. #endif /* __cplusplus */
  105.  
  106.  
  107. #endif    /* __GTKTIPSQUERY_H__ */
  108.